# -*- coding: utf-8 -*-

import readline
import cmd
import lilidb

class lilicli(cmd.Cmd):
    def __init__(self):
        cmd.Cmd.__init__(self)

        self.prompt = 'lilicli> '

        self.db = None

        
    def do_create_empty_db(self, arg):
        if len(arg) > 1:
            try:
                self.db = lilidb.create_empty_db( arg )
                print 'Banco de dados criado'
            except:
                print 'Bando de dados já existe'
        
        return False


    def do_insert_author(self, arg):
        '''TODO'''
        
        return False
    def do_quit(self, args):
        return True
